package com.ruoyi.project.video.liverooms.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.video.liverooms.mapper.LiveroomsMapper;
import com.ruoyi.project.video.liverooms.domain.Liverooms;
import com.ruoyi.project.video.liverooms.service.ILiveroomsService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 直播间Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-25
 */
@Service
public class LiveroomsServiceImpl implements ILiveroomsService 
{
    @Autowired
    private LiveroomsMapper liveroomsMapper;

    /**
     * 查询直播间
     * 
     * @param RoomID 直播间主键
     * @return 直播间
     */
    @Override
    public Liverooms selectLiveroomsByRoomID(Long RoomID)
    {
        return liveroomsMapper.selectLiveroomsByRoomID(RoomID);
    }

    /**
     * 查询直播间列表
     * 
     * @param liverooms 直播间
     * @return 直播间
     */
    @Override
    public List<Liverooms> selectLiveroomsList(Liverooms liverooms)
    {
        return liveroomsMapper.selectLiveroomsList(liverooms);
    }

    /**
     * 新增直播间
     * 
     * @param liverooms 直播间
     * @return 结果
     */
    @Override
    public int insertLiverooms(Liverooms liverooms)
    {
        return liveroomsMapper.insertLiverooms(liverooms);
    }

    /**
     * 修改直播间
     * 
     * @param liverooms 直播间
     * @return 结果
     */
    @Override
    public int updateLiverooms(Liverooms liverooms)
    {
        return liveroomsMapper.updateLiverooms(liverooms);
    }

    /**
     * 批量删除直播间
     * 
     * @param RoomIDs 需要删除的直播间主键
     * @return 结果
     */
    @Override
    public int deleteLiveroomsByRoomIDs(String RoomIDs)
    {
        return liveroomsMapper.deleteLiveroomsByRoomIDs(Convert.toStrArray(RoomIDs));
    }

    /**
     * 删除直播间信息
     * 
     * @param RoomID 直播间主键
     * @return 结果
     */
    @Override
    public int deleteLiveroomsByRoomID(Long RoomID)
    {
        return liveroomsMapper.deleteLiveroomsByRoomID(RoomID);
    }
}
